package com.wujiansima.renyisima.demo;

import java.io.File;

public class Demo4 {
    public static void main(String[] args) {
        deleteDir(new File("D:\\驱动精灵"));
    }

    private static void deleteDir(File file) {
        File[] files = file.listFiles();
        for (File file1 : files) {
            if (file1.isFile()){
                file1.delete();
            }else{
                deleteDir(file1);
            }
        }

        file.delete();
    }


}
